#include "test_notifier.h"

using namespace sea;

// -------------------------------------------------------------------------------------------------

void test_notifier( )
{
    vector< MyThread* > ar;

    // Local reference will be destroyed by
    // wait( ) call
    OsNotifier* boss = NEW OsNotifier( );

    int n = 10;
    for( int i = 0; i < n; i++ )
    {
        MyThread* obj = NEW MyThread( boss );
        ar.insert( ar.end( ), obj );
        obj->start( );
    }

    boss->wait( );
    SEA_TRACE("all done");

    for( int i = 0; i < n; i++ )delete ar[ i ];

    SEA_MEM_LEAKS( );
}

// -------------------------------------------------------------------------------------------------

